package com.seu.dm.mappers;

import com.seu.dm.entities.Seckill;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created by Greeting on 2017/3/20.
 */
public interface SeckillMapper {

    List<Seckill> queryAll();

    Seckill queryById(@Param("seckillId") long seckillId);

    Seckill queryAvailableByIdAndStartTime(@Param("seckillId") long seckillId,@Param("startTime") Date startTime);

    List<Seckill> queryAllStandByByStartTimeWithProduct(@Param("startTime") Date startTime);

    int insert(Seckill seckill);

    int reduceNumberById(@Param("seckillId") long seckillId);

    int update(Seckill seckill);

    int deleteById(long seckillId);

    //int executeKill(long seckillId,Integer buyerId);



}
